Skip to content

Remove dist/action from main, build at release time#101

Merged
dcramer merged 3 commits intomainfrom
remove-dist-from-main
Feb 11, 2026
Merged

Remove dist/action from main, build at release time#101
dcramer merged 3 commits intomainfrom
remove-dist-from-main

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Feb 4, 2026

  • Remove all dist/ artifacts from main. The ncc action bundle is now built and committed to release tags only by the update-major-tag workflow.
  • Disable sourcemaps in ncc output (--no-source-map-register).
  • Remove sourcemap-register.cjs from git tracking.
  • Add release process spec documenting the full artifact pipeline.

Before: dist/action/ was committed to main on every release via bump-version.sh. Sourcemaps, declaration files, and type maps accumulated in git history.

After: Main has zero build artifacts. The update-major-tag workflow builds the ncc bundle, commits only the bundle files to a detached commit, and force-updates both the version tag (v0.7.0) and major tag (v0). npm publishing is unaffected (Craft downloads pre-built tarballs from CI artifacts).

See specs/release-process.md for the full release flow documentation.

@vercel
Copy link

vercel bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
warden Ready Ready Preview, Comment Feb 11, 2026 10:01pm

Request Review

sentry-warden[bot]
sentry-warden bot previously requested changes Feb 4, 2026
Comment on lines 70 to 71
pnpm build
pnpm build:action
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Missing pnpm install before build commands (high confidence)

The workflow runs pnpm build and pnpm build:action (lines 70-71) without first running pnpm install. Dependencies won't exist and the build will fail. The CI workflow correctly runs pnpm install --frozen-lockfile before building.

Suggested fix: Add pnpm install --frozen-lockfile before the build commands

Suggested change
pnpm build
pnpm build:action
# Install dependencies
pnpm install --frozen-lockfile

Identified by Warden via notseer · critical, high confidence

fi
# Commit artifacts to release branch
git add -f dist/action/
git commit -m "build: Add action artifacts for ${TAG}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Missing git user configuration before commit (high confidence)

The workflow runs git commit (line 75) without configuring git user.name and user.email. Git requires these to create commits and will fail with 'Author identity unknown'. The update-major-tag.yml workflow correctly sets these before committing.

Suggested fix: Add git config for user identity before the commit

Suggested change
git commit -m "build: Add action artifacts for ${TAG}"
# Configure git identity for commits
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

Identified by Warden via notseer · critical, high confidence

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@dcramer
Copy link
Member Author

dcramer commented Feb 4, 2026

we need to figure out a path here but this prob isnt it

dcramer and others added 2 commits February 11, 2026 13:31
Move ncc action bundle out of the main branch entirely. The
update-major-tag workflow now builds the bundle and force-updates
release tags to include it. Sourcemaps disabled from ncc output.

- Gitignore all of dist/ (no more whitelist exceptions)
- Remove dist/action/ from tracked files
- Remove ncc build and git add from bump-version.sh
- Update update-major-tag workflow to build ncc bundle, commit it,
  and force-update both version and major tags
- Remove --source-map from ncc build command

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dcramer dcramer force-pushed the remove-dist-from-main branch from f4d1d36 to f1ced52 Compare February 11, 2026 21:55
@dcramer dcramer changed the title ref: Remove dist/ from version control in main Remove dist/action from main, build at release time Feb 11, 2026
Skip the commit if dist/action/ is already present and unchanged,
so the workflow can be safely re-run for recovery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
run: pnpm build:action

- name: Commit bundle and update tags
run: |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The workflow uses $GITHUB_REF_NAME to create a release tag, but this variable is not reliably populated for release triggers, which could lead to incorrect tagging.
Severity: HIGH

Suggested Fix

Replace the usage of $GITHUB_REF_NAME in the bash script with ${{ github.event.release.tag_name }}. This can be achieved by passing it as an environment variable to the step before it is used, for example: env: RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}, and then using $RELEASE_TAG_NAME in the script.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/update-major-tag.yml#L32

Potential issue: In the `update-major-tag.yml` workflow, a script uses the
`$GITHUB_REF_NAME` environment variable to derive the version for creating a new git
tag. However, for workflows triggered by a `release` event, `GITHUB_REF_NAME` is not
guaranteed to be populated and may be empty. This will cause the script to attempt to
create a tag named `v`, which will either fail or corrupt the release tagging process.
This would break the GitHub Action for that release version. An earlier step in the same
workflow correctly uses `github.event.release.tag_name`, indicating this is likely an
oversight.

@dcramer dcramer merged commit 7f6b6e7 into main Feb 11, 2026
11 checks passed
@dcramer dcramer deleted the remove-dist-from-main branch February 11, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant